﻿<%@ Page Title="Xtablish CRM / New Email Template" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="AddNewEmailTemplate.aspx.cs" Inherits="Web.EmailTemplate.AddNewEmailTemplate" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ID="Content1" ContentPlaceHolderID="headContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Con1" runat="server">
    <link rel="stylesheet" type="text/css" href="../CSS/style.css" />
    <link rel="stylesheet" type="text/css" href="../CSS/bootstrap.min.css" />
    <link href="../CSS/Fonts.css" rel='stylesheet' type='text/css' />
    <script src="../JS/jquery.min.js"></script>
    <script src="../JS/bootstrap.min.js"></script>
    <script src="../JS/verify.notify.min.js"></script>
    <link href="../CSS/jquery-ui.css" rel='stylesheet' type='text/css' />
    <script src="../JS/jquery-ui.min.js"></script>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function OnClientClose(oWnd, args) { }
            function CancelClick() {
                window.location.assign(document.getElementById('<%= hdntxtPrevPage.ClientID %>').value);
            }
            function WebForm_OnSubmit() {
                if (typeof (ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) {
                    $("#validation_dialog").dialog({
                        title: "Validation Error!",
                        modal: true,
                        resizable: false,
                        buttons: {
                            Close: function () {
                                $(this).dialog('close');
                            }
                        }
                    });
                    return false;
                }
                return true;
            }
        </script>
    </telerik:RadCodeBlock>
    <asp:HiddenField ID="hdntxtPrevPage" runat="server"></asp:HiddenField>
    <div class="register">        
        <div class="container-fluid">
            <div class="row">
                <div class="col-md-6">
                    <h3>Creating New Email Template</h3>
                </div>
                <div class="col-md-6 btn-edit">
                    <asp:LinkButton id="btnTop_Save" type="button" runat="server" class="btn btn-defaul" OnClick="btn_Save_Click">
                        <img src="../Images/save.png" style="width: 18px; height: 18px" /> Save
                    </asp:LinkButton>
                    <div id="validation_dialog" style="display: none">
                        <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
                    </div>
                    <asp:LinkButton id="btnTop_Cancel" type="button" runat="server" class="btn btn-defaul" OnClientClick="CancelClick()" CausesValidation="false">
                        <img src="../Images/back.png" style="width: 18px; height: 18px" /> Back
                    </asp:LinkButton>
                </div>
            </div>
            <div class="row">
                <div class="edit-form highlight">
                    <div class="control-group">
                        <h4>Email Template Details</h4>
                    </div>
                    <div class="control-group">
                        <div class="col-md-10 distance-control" style="padding-left: 0;">
                            <div class="col-md-3" style="padding-top: 12px; padding-bottom: 0">
                                <label class="control-label">Template Name <span class="red-star">*</span></label>
                            </div>
                            <div class="col-md-9" style="background: #fff none repeat scroll 0 0; padding-top: 6px; padding-bottom: 6px">
                                <div class="controls">
                                    <asp:TextBox ID="txtTemplateName" runat="server" class="form-control" data-validate="required" />
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" Display="None" ControlToValidate="txtTemplateName"
                                        runat="server" ErrorMessage="Template Name is required."></asp:RequiredFieldValidator>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <div class="control-group">
                       <div class="col-md-10 distance-control" style="padding-left: 0;">
                            <div class="col-md-3" style="padding-top: 12px; padding-bottom: 0">
                                <label class="control-label">Description</label>
                            </div>
                            <div class="col-md-9" style="background: #fff none repeat scroll 0 0; padding-top: 6px; padding-bottom: 6px">
                                <div class="controls">
                                    <asp:TextBox ID="txtDescription" runat="server" class="form-control" />
                                </div>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <div class="control-group">
                        <div class="col-md-10 distance-control" style="padding-left: 0;">
                            <div class="col-md-3" style="padding-top: 12px; padding-bottom: 0">
                                <label class="control-label">Subject</label>
                            </div>
                            <div class="col-md-9" style="background: #fff none repeat scroll 0 0; padding-top: 6px; padding-bottom: 6px">
                                <div class="controls">
                                    <asp:TextBox ID="txtSubject" runat="server" class="form-control" />
                                </div>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <div class="control-group">
                        <div class="col-md-10 distance-control" style="padding-left: 0;">
                            <div class="col-md-3" style="padding-top: 12px; padding-bottom: 0">
                                <label class="control-label">Message</label>
                            </div>
                            <div class="col-md-9" style="background: #fff none repeat scroll 0 0; padding-top: 6px; padding-bottom: 6px">
                                <div class="controls">
                                    <asp:TextBox ID="txtMessage" runat="server" class="form-control" TextMode="MultiLine"  Rows="10" Width="100%"/>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                </div>
            </div>
            <!-- end row 4 -->
            <div class="row">
                <div class="col-md-12 btn-edit">
                    <asp:LinkButton id="btnBottom_Save" type="button" class="btn btn-defaul" runat="server" OnClick="btn_Save_Click">
                        <img src="../Images/save.png" style="width: 18px; height: 18px" /> Save
                    </asp:LinkButton>
                    <asp:LinkButton id="btnBottom_Cancel" runat="server" type="button" class="btn btn-defaul" OnClientClick="CancelClick()" CausesValidation="false">
                        <img src="../Images/back.png" style="width: 18px; height: 18px" /> Back
                    </asp:LinkButton>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
